namespace Collaboris.Saf.Actions.Wss.Tests.Generated
{
    using Engine.Report;

    using Microsoft.SharePoint;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Saf.Tests;
    using Entities;
    using File;

    using SharePoint.Wss.Files;


    /// <summary>
    /// This test was originally generated but has now been tested and verfiied by MJ
    /// </summary>
    [TestClass]
    public class ApproveFilesTest
    {
        [TestMethod]
        public void ApproveFiles_Test()
        {
            WSSTestAssistant<ApproveFiles, ApproveFileInfo> approvefiles =
                    new WSSTestAssistant<ApproveFiles, ApproveFileInfo>(TestEnvironment.PublishingSite, 
                        "ApproveFilesTestWeb", "BLANKINTERNET#0");

            using (approvefiles)
            {
                MacroReport doReport = approvefiles.DoMacro();

                SPFile defaultAspx = SPFileHelper.GetFile(approvefiles.TestWeb, "Pages", "default.aspx");

                Assert.IsTrue(SPFileHelper.GetModerationStatus(defaultAspx) == SPModerationStatusType.Approved);
            }
        }
    }
}
